package common;

import org.junit.Test;

import java.util.StringJoiner;
import java.util.stream.IntStream;

/**
 * @author jiangwz
 * @create 2022/1/21.
 */
public class StringTests {

    @Test
    public void testStringJoiner(){
        StringJoiner sj = new StringJoiner(",");
        IntStream.range(1,10).forEach(i->sj.add(i+""));

        sj.add("11");
        sj.add("12");
        sj.add("13");

        System.out.println(sj.toString());
    }
}
